# try:
#     num=int(input("请输入一个数字"))
#     try:
#         result=15/num
#         pass
#     except Exception as msg:
#         print(msg)
#         print("分母不能为0")
#         pass
#     pass
# except Exception as msg:
#     print(msg)
#     pass

# 异常传递：如果多个函数嵌套调用，内层函数异常，异常会往外部传递，直到异常被抛出，或被处理。
def a():
    print(1/0)
    pass
def b():
    a()
    pass
def c():
    try:
        b()
        pass
    except Exception as msg:
        print(msg)
        pass
    pass
c()
